<html>
<head>
<link type="text/css" rel="styleSheet" href="css/default.css" />
<link type="text/css" rel="styleSheet" href="css/css.css" />
<script src="js/vue.min.js"></script>
<script src="js/vue-cookies.js"></script>
<script src="js/jquery-3.5.1.js"></script>
</head>
<body>
	<div id="app">
				<div v-for="a in articles">
					<div class="article" style="height:130px;">
						<div id="title" style="height:30px;"><h3 style="margin:0" ><a :href="'/article.html?'+a.id" style="color:black;">{{a.title}}</a></h3></div>
						<div id="content" style="height:60px;overflow:hidden;">{{a.content}}</div>
						<div style="margin-top:12px;">
							<span class="bottom-tag">赞同{{a.like}}</span>
							<span class="bottom-tag">反对{{a.nolike}}</span>
							<span class="bottom-tag">回复0</span>
							<button  btncolor = "blue" btnsize = "s"><a :href="'/edit.html?'+a.id" style="color:white;">编辑</a></button>
							<span id="time" style="float:right">{{a.time}}</span>
						</div>
					</div>
				</div>
	</div>
</body>
<script>
var userid = window.$cookies.get("userid");
	$.ajax({
		url:"http://localhost/getmyarticle/"+userid,
		type:"get",
		success:function(response){
			vm.articles=response;
		}
	});
	var vm = new Vue({
		el : "#app",
		data:{
			 articles:"",
		},

	});

</script>
</html>